﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Rendering.LODParameters
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;

#nullable disable
namespace UnityEngine.Rendering
{
  /// <summary>
  ///   <para>LODGroup culling parameters.</para>
  /// </summary>
  public struct LODParameters : IEquatable<LODParameters>
  {
    private int m_IsOrthographic;
    private Vector3 m_CameraPosition;
    private float m_FieldOfView;
    private float m_OrthoSize;
    private int m_CameraPixelHeight;

    /// <summary>
    ///   <para>Indicates whether camera is orthographic.</para>
    /// </summary>
    public bool isOrthographic
    {
      get => Convert.ToBoolean(this.m_IsOrthographic);
      set => this.m_IsOrthographic = Convert.ToInt32(value);
    }

    /// <summary>
    ///   <para>Camera position.</para>
    /// </summary>
    public Vector3 cameraPosition
    {
      get => this.m_CameraPosition;
      set => this.m_CameraPosition = value;
    }

    /// <summary>
    ///   <para>Camera's field of view.</para>
    /// </summary>
    public float fieldOfView
    {
      get => this.m_FieldOfView;
      set => this.m_FieldOfView = value;
    }

    /// <summary>
    ///   <para>Orhographic camera size.</para>
    /// </summary>
    public float orthoSize
    {
      get => this.m_OrthoSize;
      set => this.m_OrthoSize = value;
    }

    /// <summary>
    ///   <para>Rendering view height in pixels.</para>
    /// </summary>
    public int cameraPixelHeight
    {
      get => this.m_CameraPixelHeight;
      set => this.m_CameraPixelHeight = value;
    }

    public bool Equals(LODParameters other)
    {
      return this.m_IsOrthographic == other.m_IsOrthographic && this.m_CameraPosition.Equals(other.m_CameraPosition) && this.m_FieldOfView.Equals(other.m_FieldOfView) && this.m_OrthoSize.Equals(other.m_OrthoSize) && this.m_CameraPixelHeight == other.m_CameraPixelHeight;
    }

    public override bool Equals(object obj)
    {
      return obj != null && obj is LODParameters other && this.Equals(other);
    }

    public override int GetHashCode()
    {
      return (((this.m_IsOrthographic * 397 ^ this.m_CameraPosition.GetHashCode()) * 397 ^ this.m_FieldOfView.GetHashCode()) * 397 ^ this.m_OrthoSize.GetHashCode()) * 397 ^ this.m_CameraPixelHeight;
    }

    public static bool operator ==(LODParameters left, LODParameters right) => left.Equals(right);

    public static bool operator !=(LODParameters left, LODParameters right) => !left.Equals(right);
  }
}
